package testcase.framework.packaging;

import java.io.File;

import org.junit.Test;

import satir.framework.packaging.Packager;
import satir.framework.packaging.Packager.PackagerArchieveFileDestinationNotFoundException;
import satir.framework.packaging.Packager.PackagerArchieveFileToBeArchievedNotFoundException;
import satir.framework.packaging.Packager.PackagerArchieveZipFileWriteFailureException;

import junit.framework.TestCase;

import junitx.util.PrivateAccessor;

public class Packager_achieve_1 extends TestCase {

	/**
	 * Sets up the test fixture.
	 * 
	 * Called before every test case method.
	 */
	public void setUp() {

	}

	/**
	 * Tears down the test fixture.
	 * 
	 * Called after every test case method.
	 */
	public void tearDown() {
	}

	/**
	 * Step number : 1
	 * Goal: Zip files inside directory of "temp" into a achieve file of "file.save"
	 */
	@Test
	public void testAchieve1() {
		Packager target = new Packager("file.save");
		String source = "temp/", destination = "save/";
		try {
			target.achieve(source, destination);
			assertEquals(true, true);
		} catch (PackagerArchieveFileDestinationNotFoundException e1) {
			e1.printStackTrace();
			fail(e1.toString());
		} catch (PackagerArchieveFileToBeArchievedNotFoundException e1) {
			e1.printStackTrace();
			fail(e1.toString());
		} catch (PackagerArchieveZipFileWriteFailureException e1) {
			e1.printStackTrace();
			fail(e1.toString());
		}
	}
}
